﻿<UserControl x:Class="LaunchPad.Core.Controls.ShowControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="80" d:DesignWidth="800" Background="Black">
    <Grid>
        <Grid.Background>
            <DrawingBrush TileMode="Tile"  Stretch="None" ViewportUnits="Absolute" Viewport="0,0,36,36" >
                <DrawingBrush.Drawing>
                    <DrawingGroup>
                        <GeometryDrawing Geometry="M0,36 L36,0" Brush="Red">
                            <GeometryDrawing.Pen>
                                <Pen Brush="Red" Thickness="12" />
                            </GeometryDrawing.Pen>
                        </GeometryDrawing>
                        <GeometryDrawing Geometry="M0,0 L0.1,0.1" Brush="Red" >
                            <GeometryDrawing.Pen>
                                <Pen Brush="Red" Thickness="12" EndLineCap="Square" />
                            </GeometryDrawing.Pen>
                        </GeometryDrawing>
                        <GeometryDrawing Geometry="M36,36 L35.9,35.9" Brush="Red">
                            <GeometryDrawing.Pen>
                                <Pen Brush="Red" Thickness="12" EndLineCap="Square" />
                            </GeometryDrawing.Pen>
                        </GeometryDrawing>
                    </DrawingGroup>
                </DrawingBrush.Drawing>
            </DrawingBrush>
        </Grid.Background>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>


        <TextBlock Grid.Column="3" Grid.Row="0" Text="LAPSED" FontSize="16" FontWeight="Bold" Foreground="White" />
        <Border Grid.Column="3" Grid.Row="1" VerticalAlignment="Stretch" BorderBrush="Black"  BorderThickness="1" Margin="0,0,6,6" >
            <TextBlock Name="lapsedTextBlock" VerticalAlignment="Stretch" FontSize="32" FontFamily="Segoe UI" TextAlignment="Left" Padding="6,0,6,0" FontWeight="Bold" >
                <TextBlock.Background>
                    <RadialGradientBrush  GradientOrigin="0,.1" Center="0,.3" RadiusX="10">
                        <GradientStop Color="White" Offset="0" />
                        <GradientStop Color="#EEDA4040" Offset="1" />
                    </RadialGradientBrush>
                </TextBlock.Background>
            </TextBlock>
        </Border>

        <TextBlock Text="REMAINING" FontSize="16" FontWeight="Bold" Grid.Column="4" Foreground="White"/>
        <Border Grid.Column="4" Grid.Row="1" VerticalAlignment="Stretch" BorderBrush="Black"  BorderThickness="1" Margin="0,0,6,6">
            <TextBlock Name="remainingTextBlock" VerticalAlignment="Stretch" FontSize="32" FontFamily="Segoe UI" TextAlignment="Left" Padding="6,0,6,0" FontWeight="Bold" >
                <TextBlock.Background>
                    <RadialGradientBrush GradientOrigin="0,.1" Center="0,.3" RadiusX="10">
                        <GradientStop Color="White" Offset="0" />
                        <GradientStop Color="#EEDA4040" Offset="1" />
                    </RadialGradientBrush>
                </TextBlock.Background>
            </TextBlock>
        </Border>

        <ToggleButton HorizontalAlignment="Stretch" Grid.RowSpan="2" Name="pauseButton" VerticalAlignment="Stretch" Checked="PauseButtonChecked" Unchecked="PauseButtonUnchecked" Padding="10,10,9,10" Margin="6" Grid.Column="1">
            <ToggleButton.Style>
                <Style TargetType="{x:Type ToggleButton}">
                    <Setter Property="Content">
                        <Setter.Value>
                            <Path Height="36" Stretch="Uniform" Fill="Black" Data="M 0 0 L 0 60 L 30 60 L 30 0 M 45 0 L 45 60 L 75 60 L 75 0 Z"/>
                        </Setter.Value>
                    </Setter>
                    <Style.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Content">
                                <Setter.Value>
                                    <Path Fill="Black" Data="M 0 0 L 40 30 L 0 60 Z"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ToggleButton.Style>
        </ToggleButton>

        <Button Content="ABORT" HorizontalAlignment="Stretch" Grid.Column="2" Grid.RowSpan="2" Name="abortButton" VerticalAlignment="Stretch"
                FontSize="42" IsDefault="True" IsCancel="True" Click="AbortButtonClick" FontWeight="Bold" Margin="6" VerticalContentAlignment="Center" Padding="6,0,6,6"/>
    </Grid>
</UserControl>
